<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	<?php //untuk merefresh timeout
		if (!Yii::app()->user->isGuest) {?>
			<meta http-equiv="refresh" content="<?php echo Yii::app()->params['session_timeout'];?>;"/>
	<?php }?>

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<link rel="icon" href="<?php echo Yii::app()->request->baseUrl; ?>/images/template/favicon.png" sizes="16x16" type="image/png" />
	
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/sipadustyle-jenis1.css" />
	<style>
		@font-face {
			font-family: 'OCR';
			src: url('<?php echo Yii::app()->request->baseUrl; ?>/font/ocr-b___-webfont.eot');
			src: url('<?php echo Yii::app()->request->baseUrl; ?>/font/ocr-b___-webfont.eot?#iefix') format('embedded-opentype'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/ocr-b___-webfont.woff') format('woff'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/ocr-b___-webfont.ttf') format('truetype'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/ocr-b___-webfont.svg#ocr-b_10_btregular') format('svg');
			font-weight: normal;
			font-style: normal;
		}
		@font-face {
			font-family: 'AgencyB';
			src: url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyb-webfont.eot');
			src: url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyb-webfont.eot?#iefix') format('embedded-opentype'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyb-webfont.woff') format('woff'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyb-webfont.ttf') format('truetype'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyb-webfont.svg#agency_fbbold') format('svg');
			font-weight: normal;
			font-style: normal;

		}
		@font-face {
			font-family: 'AgencyR';
			src: url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyr-webfont.eot');
			src: url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyr-webfont.eot?#iefix') format('embedded-opentype'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyr-webfont.woff') format('woff'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyr-webfont.ttf') format('truetype'),
				 url('<?php echo Yii::app()->request->baseUrl; ?>/font/agencyr-webfont.svg#agency_fbregular') format('svg');
			font-weight: normal;
			font-style: normal;

		}
	</style>
	
</head>

<body>

<div id="outer">
	<div id="selamat-datang">
		Selamat Datang <span class="agencyb">
		<?php echo User::model()->findByPk(Yii::app()->user->id)->nama; ?>
		</span>
	</div>
	<div id="logout">
		<?php echo CHtml::link('LOGOUT',array('site/logout')); ?>
	</div>
    <div id="header">
        <img width="100%" src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/header.jpg" alt="Header.jpg" />
    </div>
	<div id="pengumuman">
		<marquee direction="left" behavior="scroll"  scrolldelay="30" scrollamount="2" onmouseout="this.start()" onmouseover="this.stop()"> <?php echo Runningtext::model()->findByPk(Yii::app()->db->createCommand("SELECT MAX( id ) FROM runningtext")->queryScalar())->pengumuman; ?></marquee>
	</div> 
		<div id="mainmenu">
			<div id="judul-menubar"><span class="caret"></span> MENU</div>
			<div class="menu">
				<table>
					<tr><td class="gambar-menu"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/beranda.png" alt="icon-beranda" /></td>
					<td class="judul-menu">Menu Utama</td></tr>
				</table>
			</div>
			<div class="menu-expand">
				<?php $this->widget('zii.widgets.CMenu',array(
					'items'=>array(
						array('label'=>'BERANDA', 'url'=>array('/site/index')),
						array('label'=>'LIHAT AMANAH', 'url'=>array('/site/amanah')),
						array('label'=>'PENGATURAN', 'url'=>array('/site/konfigurasi'), 'visible'=>Yii::app()->user->isSekretaris()),
						array('label'=>'UBAH PENGUMUMAN', 'url'=>array('/site/pengumuman'), 'visible'=>Yii::app()->user->isBph()),
						array('label'=>'UBAH PENGURUS', 'url'=>array('/site/ubahkepengurusan'), 'visible'=>Yii::app()->user->isKetua()),
					),
				)); ?>
			</div>
			<div class="menu">
				<table>
					<tr><td class="gambar-menu"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/profil.png" alt="icon-profil" /></td>
					<td class="judul-menu">Profil Saya</td></tr>
				</table>
			</div>
			<div class="menu-expand">
				<?php $this->widget('zii.widgets.CMenu',array(
					'items'=>array(
						array('label'=>'LIHAT PROFIL', 'url'=>array('/user/view', 'id'=>Yii::app()->user->id)),
						array('label'=>'EDIT PROFIL', 'url'=>array('/user/updateProfil', 'id'=>Yii::app()->user->id)),
						array('label'=>'AMANAH SAYA', 'url'=>array('/user/amanah', 'id'=>Yii::app()->user->id)),
					),
				)); ?>
			</div>
			<div class="menu">
				<table>
					<tr><td class="gambar-menu"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/database.png" alt="icon-database" /></td>
					<td class="judul-menu">Database Anggota</td></tr>
				</table>
			</div>
			<div class="menu-expand">
				<?php $this->widget('zii.widgets.CMenu',array(
					'items'=>array(
						//SILAKAN TAMBAHKAN SENDIRI MENU DATABASENYA KALAU ADA DIVISI BARU
						array('label'=>'BPH AKTIF', 'url'=>array('/user/bph')),
						array('label'=>'DIVISI EKSTERNAL', 'url'=>array('/user/eksternal')),
						array('label'=>'DIVISI INTERNAL', 'url'=>array('/user/internal')),
						array('label'=>'DIVISI LITBANG', 'url'=>array('/user/litbang')),
						array('label'=>'SEMUA ANGGOTA', 'url'=>array('/user/semua')),
						array('label'=>'MENEJ ANGGOTA', 'url'=>array('/user/admin'), 'visible'=>Yii::app()->user->isSekretaris()),
					),
				)); ?>
			</div>
			<div class="menu">
				<table>
					<tr><td class="gambar-menu"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/absensi.png" alt="icon-absensi" /></td>
					<td class="judul-menu">Rapat dan Absensi</td></tr>
				</table>
			</div>
			<div class="menu-expand">
				<?php $this->widget('zii.widgets.CMenu',array(
					'items'=>array(
						//SILAKAN TAMBAHKAN SENDIRI MENU DATABASENYA KALAU ADA DIVISI BARU
						array('label'=>'LIHAT ABSENSI', 'url'=>array('/absensi/view', 'id' => Yii::app()->user->id)),
						array('label'=>'SEMUA ABSENSI', 'url'=>array('/absensi/semua'), 'visible'=>Yii::app()->user->isBph()),
						array('label'=>'MENEJ ABSENSI', 'url'=>array('/absensi/admin'), 'visible'=>Yii::app()->user->isSekretaris()),
						array('label'=>'LIHAT RAPAT', 'url'=>array('/rapat')),
						array('label'=>'SEMUA RAPAT', 'url'=>array('/rapat/semua'), 'visible'=>Yii::app()->user->isBph()),
						array('label'=>'MENEJ RAPAT', 'url'=>array('/rapat/admin'), 'visible'=>Yii::app()->user->isSekretaris()),
					),
				)); ?>
			</div>
			<div class="menu">
				<table>
					<tr><td class="gambar-menu"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/keuangan.png" alt="icon-keuangan" /></td>
					<td class="judul-menu">Pengelolaan Keuangan</td></tr>
				</table>
			</div>
			<div class="menu-expand">
				<?php $this->widget('zii.widgets.CMenu',array(
					'items'=>array(
						//SILAKAN TAMBAHKAN SENDIRI MENU DATABASENYA KALAU ADA DIVISI BARU
						array('label'=>'LIHAT KEUANGAN', 'url'=>array('/keuangan')), //DIFFERENT VIEW BETWEEN USER AND BPH
						array('label'=>'SEMUA KEUANGAN', 'url'=>array('/keuangan/semua'), 'visible'=>Yii::app()->user->isBph()),
						array('label'=>'MENEJ KEUANGAN', 'url'=>array('/keuangan/admin'), 'visible'=>Yii::app()->user->isBendahara()),
					),
				)); ?>
			</div>
			<div class="menu">
				<table>
					<tr><td class="gambar-menu"><img src="<?php echo Yii::app()->request->baseUrl; ?>/images/template/kegiatan.png" alt="icon-kegiatan" /></td>
					<td class="judul-menu">Proker dan Kegiatan</td></tr>
				</table>
			</div>
			<div class="menu-expand">
				<?php $this->widget('zii.widgets.CMenu',array(
					'items'=>array(
						//SILAKAN TAMBAHKAN SENDIRI MENU DATABASENYA KALAU ADA DIVISI BARU
						array('label'=>'LIHAT KEGIATAN', 'url'=>array('/kegiatan')), //DIFFERENT VIEW BETWEEN USER AND BPH
						array('label'=>'SEMUA KEGIATAN', 'url'=>array('/kegiatan/semua'), 'visible'=>Yii::app()->user->isBph()),
						array('label'=>'MENEJ KEGIATAN', 'url'=>array('/kegiatan/admin'), 'visible'=>Yii::app()->user->isSekretaris()),
					),
				)); ?>
			</div>
			
		</div>
		<div id="main">
			<?php date_default_timezone_set('Asia/Jakarta'); ?>
			<?php
				switch (date("w")) {
					case "0" : $hari="Minggu";break;
					case "1" : $hari="Senin";break;
					case "2" : $hari="Selasa";break;
					case "3" : $hari="Rabu";break;
					case "4" : $hari="Kamis";break;
					case "5" : $hari="Jumat";break;
					case "6" : $hari="Sabtu";break;
				} switch (date("m")) {
					case "1" : $bulan="Januari";break;
					case "2" : $bulan="Februari";break;
					case "3" : $bulan="Maret";break;
					case "4" : $bulan="April";break;
					case "5" : $bulan="Mei";break;
					case "6" : $bulan="Juni";break;
					case "7" : $bulan="Juli";break;
					case "8" : $bulan="Agustus";break;
					case "9" : $bulan="September";break;
					case "10" : $bulan="Oktober";break;
					case "11" : $bulan="November";break;
					case "12" : $bulan="Desember";break;
				}
				$indDate="$hari, ". date("d") ." $bulan ". date("Y");
			?>	
			<div id="breadcrumbs-bimbel">
				<?php if(isset($this->breadcrumbs)):?>
					<?php $this->widget('zii.widgets.CBreadcrumbs', array(
						'links'=>$this->breadcrumbs,
					)); ?><!-- breadcrumbs -->
				<?php endif?>
			</div>
			<div id="tanggal"><?php echo $indDate; ?></div>
			<div id="komponen">
				<?php echo $content; ?>
			</div>
		</div>
	<!-- backtotop -->
	<div class="back-to-top" id="back-top">
		<a href="javascript:void(0)" class="back-to-top">Top</a>
	</div>
	
	<div id="footer">
		<?php 
			$hakcipta = "2014 - ". date("Y");
			if(date("Y")=="2014") $hakcipta = "2014";
		?>
		<p>Hakcipta &copy; <?php echo $hakcipta; ?> UKM Bimbel STIS</p>
	</div>

</div>



		
				
<script type="text/javascript">
$(function () {
    $("#back-top").hide();
    $(window).scroll(function () {
        if ($(this).scrollTop() > 150) {
            $('#back-top').fadeIn();
        } else {
            $('#back-top').fadeOut();
        }
    });
});
jQuery('.back-to-top').click(function () {
    jQuery('html, body').animate({
        scrollTop: 0
    }, 'slow');
});
</script>


<!--end of Scroll back to top-->
</body>


</html>
